import '../models/question_entity.dart';
import '../models/answer_entity.dart';

/// 默认问答数据集合
class DefaultQADataCollection {
  static const DefaultQADataCollection _instance = DefaultQADataCollection._();
  const DefaultQADataCollection._();

  static const DefaultQADataCollection defaultQAData = _instance;

  /// 默认问题列表
  List<QuestionEntity> get questions => [
    // 问题1：关于学习方法
    QuestionEntity(
      questionId: 'q001',
      authorId: 'user_001',
      title:
          'Why does my 3D printed model keep sticking to the nozzle and dragging during printing?',
      mediaType: QAMediaType.image,
      mediaUrl: 'assets/images/discussion1.png',
      publishTime: DateTime(2024, 1, 15, 10, 30),
      likeCount: 12,
      answerCount: 5,
      likedUserIds: ['user_002', 'user_003', 'user_004'],
    ),

    // 问题2：关于职业规划
    QuestionEntity(
      questionId: 'q002',
      authorId: 'user_002',
      title:
          'What\'s the best filament for printing durable, outdoor-use parts (like garden planter brackets)?',
      mediaType: QAMediaType.image,
      mediaUrl: 'assets/images/discussion2.png',
      publishTime: DateTime(2024, 1, 14, 14, 20),
      likeCount: 18,
      answerCount: 5,
      likedUserIds: ['user_001', 'user_003', 'user_005', 'user_006'],
    ),

    // 问题3：关于健康生活
    QuestionEntity(
      questionId: 'q003',
      authorId: 'user_003',
      title:
          'How can I fix layer separation (cracks between layers) in my large 3D prints?',
      mediaType: QAMediaType.video,
      mediaUrl: 'assets/videos/video1.mp4',
      thumbnailUrl: 'assets/images/discussion3.png',
      publishTime: DateTime(2024, 1, 13, 16, 45),
      likeCount: 25,
      answerCount: 5,
      likedUserIds: ['user_001', 'user_002', 'user_004', 'user_005'],
    ),

    // 问题4：关于人际关系
    QuestionEntity(
      questionId: 'q004',
      authorId: 'user_004',
      title:
          'My resin 3D prints have sticky surfaces even after curing—how do I fix this?',
      mediaType: QAMediaType.image,
      mediaUrl: 'assets/images/discussion4.png',
      publishTime: DateTime(2024, 1, 12, 9, 15),
      likeCount: 15,
      answerCount: 5,
      likedUserIds: ['user_001', 'user_002', 'user_003'],
    ),

    // 问题5：关于技能提升
    QuestionEntity(
      questionId: 'q005',
      authorId: 'user_005',
      title:
          'What\'s the easiest way to remove support structures from 3D prints without damaging the model?',
      mediaType: QAMediaType.video,
      mediaUrl: 'assets/videos/video2.mp4',
      thumbnailUrl: 'assets/images/discussion1.png',
      publishTime: DateTime(2024, 1, 11, 20, 30),
      likeCount: 32,
      answerCount: 5,
      likedUserIds: [
        'user_001',
        'user_002',
        'user_003',
        'user_004',
        'user_006',
      ],
    ),

    // 问题6：关于理财投资
    QuestionEntity(
      questionId: 'q006',
      authorId: 'user_006',
      title:
          'Why does my 3D printer make a loud clicking noise during printing, and how do I fix it?',
      mediaType: QAMediaType.image,
      mediaUrl: 'assets/images/discussion2.png',
      publishTime: DateTime(2024, 1, 10, 11, 45),
      likeCount: 28,
      answerCount: 5,
      likedUserIds: ['user_001', 'user_002', 'user_003', 'user_004'],
    ),
  ];

  /// 默认回答列表
  List<AnswerEntity> get answers => [
    // 问题1的回答
    AnswerEntity(
      answerId: 'a001_1',
      questionId: 'q001',
      authorId: 'user_007',
      content:
          'I had this issue too! Turns out my nozzle was too close to the print bed—when I adjusted the bed level to leave a tiny gap (you should be able to slide a piece of paper under the nozzle), the dragging stopped. Also, try lowering the nozzle temperature by 5-10°C; overheated filament sticks to the nozzle more easily.',
      answerTime: DateTime(2024, 1, 15, 11, 15),
      likeCount: 8,
      likedUserIds: ['user_001', 'user_002'],
    ),
    AnswerEntity(
      answerId: 'a001_2',
      questionId: 'q001',
      authorId: 'user_008',
      content:
          'If you’re using PLA, this might be because the filament absorbed moisture. I dry my PLA in a dehydrator for 4 hours before printing, and the sticking issue went away. Another trick: add a small amount of retraction (2-3mm) in your slicer—this pulls filament back from the nozzle between layers.',
      answerTime: DateTime(2024, 1, 15, 12, 30),
      likeCount: 12,
      likedUserIds: ['user_001', 'user_003', 'user_004'],
    ),
    AnswerEntity(
      answerId: 'a001_3',
      questionId: 'q001',
      authorId: 'user_001',
      content:
          'Check if your nozzle is clogged or has leftover filament buildup! I use a needle to clear the nozzle after every print, and soak it in acetone for 10 minutes if there’s tough residue. A clean nozzle won’t grab the model as it moves.',
      answerTime: DateTime(2024, 1, 15, 14, 20),
      likeCount: 6,
      likedUserIds: ['user_002', 'user_005'],
    ),
    AnswerEntity(
      answerId: 'a001_4',
      questionId: 'q001',
      authorId: 'user_002',
      content:
          'Try increasing the "first layer speed" by 10-15% in your slicer. Slow first layers can make filament stick to the nozzle longer—speeding it up helps the filament bond to the bed faster instead of clinging to the nozzle.',
      answerTime: DateTime(2024, 1, 15, 16, 45),
      likeCount: 9,
      likedUserIds: ['user_001', 'user_003'],
    ),
    AnswerEntity(
      answerId: 'a001_5',
      questionId: 'q001',
      authorId: 'user_003',
      content:
          'If you’re printing tall models, the problem might be uneven bed temperature. My heated bed had a cold spot in the corner, so I added a bed insulator pad under it. Now the bed heats evenly, and the filament adheres consistently without dragging.',
      answerTime: DateTime(2024, 1, 15, 18, 10),
      likeCount: 11,
      likedUserIds: ['user_002', 'user_004', 'user_005'],
    ),

    // 问题2的回答
    AnswerEntity(
      answerId: 'a002_1',
      questionId: 'q002',
      authorId: 'user_004',
      content:
          'PETG is my go-to for outdoor parts! It’s waterproof, resists UV rays better than PLA, and doesn’t crack in mild temperature changes. I’ve had a PETG planter bracket outside for 6 months, and it still looks new—plus it’s cheaper than specialty filaments.',
      answerTime: DateTime(2024, 1, 14, 15, 30),
      likeCount: 15,
      likedUserIds: ['user_001', 'user_002', 'user_003'],
    ),
    AnswerEntity(
      answerId: 'a002_2',
      questionId: 'q002',
      authorId: 'user_005',
      content:
          'For heavy-duty outdoor use, try ASA. It’s designed for weather resistance—UV stable, heat-resistant up to 90°C, and doesn’t warp in rain or snow. I printed a bird feeder with ASA last year, and it survived a winter with no fading or cracking. Just make sure to use a heated enclosure; ASA needs good ventilation too.',
      answerTime: DateTime(2024, 1, 14, 16, 45),
      likeCount: 12,
      likedUserIds: ['user_002', 'user_004', 'user_005'],
    ),
    AnswerEntity(
      answerId: 'a002_3',
      questionId: 'q002',
      authorId: 'user_006',
      content:
          'If you want something sustainable, check out recycled PETG. Brands like Filaments.ca make recycled PETG that’s just as durable as regular PETG for outdoor use. I used it for a trellis bracket, and it held up to strong winds—plus it’s better for the environment.',
      answerTime: DateTime(2024, 1, 14, 17, 20),
      likeCount: 18,
      likedUserIds: ['user_001', 'user_003', 'user_006'],
    ),
    AnswerEntity(
      answerId: 'a002_4',
      questionId: 'q002',
      authorId: 'user_007',
      content:
          'Steer clear of PLA for outdoor parts! PLA degrades quickly in sunlight and moisture—my PLA plant hanger broke after 2 months outside. ABS is also tricky; it’s durable but warps easily in cold weather, and it releases fumes you need to vent.',
      answerTime: DateTime(2024, 1, 14, 18, 15),
      likeCount: 14,
      likedUserIds: ['user_002', 'user_004'],
    ),
    AnswerEntity(
      answerId: 'a002_5',
      questionId: 'q002',
      authorId: 'user_008',
      content:
          'No matter which filament you choose, add a coat of UV-resistant spray (like Rust-Oleum Clear Coat) to boost outdoor longevity. I sprayed my ASA brackets, and they’ve lasted 18 months with zero discoloration. Just let the spray dry fully before putting the part outside.',
      answerTime: DateTime(2024, 1, 14, 19, 30),
      likeCount: 16,
      likedUserIds: ['user_001', 'user_003', 'user_005'],
    ),

    // 问题3的回答
    AnswerEntity(
      answerId: 'a003_1',
      questionId: 'q003',
      authorId: 'user_001',
      content:
          'Increase your nozzle temperature by 5-10°C! Layer separation usually happens because the filament isn’t melting enough to bond with the layer below. I print ABS at 255°C instead of 245°C now, and the layers stick together like glue.',
      answerTime: DateTime(2024, 1, 13, 17, 30),
      likeCount: 20,
      likedUserIds: ['user_001', 'user_002', 'user_003'],
    ),
    AnswerEntity(
      answerId: 'a003_2',
      questionId: 'q003',
      authorId: 'user_002',
      content:
          'Don’t forget the bed temperature! For PLA, I raised my bed temp from 60°C to 70°C, and it helped the bottom layers bond better. For larger prints, a warm bed keeps the lower layers soft enough to fuse with new layers—no more cracks.',
      answerTime: DateTime(2024, 1, 13, 18, 45),
      likeCount: 17,
      likedUserIds: ['user_002', 'user_004', 'user_005'],
    ),
    AnswerEntity(
      answerId: 'a003_3',
      questionId: 'q003',
      authorId: 'user_003',
      content:
          'Slow down the printing speed for thick layers! I was printing at 60mm/s for a 0.3mm layer height, and layers kept splitting. When I dropped the speed to 40mm/s, the nozzle had more time to melt and bond filament.',
      answerTime: DateTime(2024, 1, 13, 19, 20),
      likeCount: 22,
      likedUserIds: ['user_001', 'user_003', 'user_006'],
    ),
    AnswerEntity(
      answerId: 'a003_4',
      questionId: 'q003',
      authorId: 'user_004',
      content:
          'If you’re printing ABS or PETG, an enclosure is a game-changer. I built a simple enclosure with foam boards, and it keeps the printing area warm—no more sudden temperature drops that cause layer separation. My 30cm tall ABS vase has zero cracks now.',
      answerTime: DateTime(2024, 1, 13, 20, 10),
      likeCount: 19,
      likedUserIds: ['user_002', 'user_004'],
    ),
    AnswerEntity(
      answerId: 'a003_5',
      questionId: 'q003',
      authorId: 'user_005',
      content:
          'Low-quality filament can cause layer separation too! I switched from a cheap PLA brand to Prusament, and the difference was huge. Cheap filament often has inconsistent diameter, which leads to uneven melting and poor layer adhesion. Spend a little more on trusted brands.',
      answerTime: DateTime(2024, 1, 13, 21, 30),
      likeCount: 15,
      likedUserIds: ['user_001', 'user_005'],
    ),

    // 问题4的回答
    AnswerEntity(
      answerId: 'a004_1',
      questionId: 'q004',
      authorId: 'user_006',
      content:
          'You might not be curing long enough! I used to cure my resin prints for 5 minutes, but switching to 8-10 minutes (for PLA resin) made the surface totally dry. Check your resin’s instructions—different resins need different cure times (e.g., ABS-like resin might need 12 minutes).',
      answerTime: DateTime(2024, 1, 12, 10, 30),
      likeCount: 13,
      likedUserIds: ['user_001', 'user_002'],
    ),
    AnswerEntity(
      answerId: 'a004_2',
      questionId: 'q004',
      authorId: 'user_007',
      content:
          'Make sure you’re rinsing the print thoroughly with isopropyl alcohol (IPA)! I used to just dip my prints in IPA for 30 seconds, but now I scrub them gently with a soft brush for 2 minutes, then dry them with a paper towel. Sticky residue is usually uncured resin left on the surface.',
      answerTime: DateTime(2024, 1, 12, 11, 45),
      likeCount: 16,
      likedUserIds: ['user_003', 'user_004', 'user_005'],
    ),
    AnswerEntity(
      answerId: 'a004_3',
      questionId: 'q004',
      authorId: 'user_008',
      content:
          'Use 90%+ IPA instead of lower concentrations! 70% IPA has too much water, which can leave a sticky film on the print. I switched to 99% IPA, and the stickiness disappeared—just make sure to seal the IPA bottle tightly to keep it from evaporating.',
      answerTime: DateTime(2024, 1, 12, 13, 20),
      likeCount: 11,
      likedUserIds: ['user_002', 'user_006'],
    ),
    AnswerEntity(
      answerId: 'a004_4',
      questionId: 'q004',
      authorId: 'user_001',
      content:
          'Is your curing lamp working properly? I had a cheap UV lamp that lost intensity over time—replacing it with a 405nm LED curing station fixed the sticky issue. You can test your lamp with a UV light meter (they’re cheap online) to make sure it’s still strong enough.',
      answerTime: DateTime(2024, 1, 12, 14, 15),
      likeCount: 18,
      likedUserIds: ['user_001', 'user_003', 'user_004'],
    ),
    AnswerEntity(
      answerId: 'a004_5',
      questionId: 'q004',
      authorId: 'user_002',
      content:
          'If your resin is old or exposed to light, it might cure unevenly. I store my resin in an opaque bottle in a cool, dark cabinet, and I never leave the resin vat uncovered. Old resin can leave sticky spots even after curing—try a fresh bottle if cleaning and curing don’t work.',
      answerTime: DateTime(2024, 1, 12, 15, 40),
      likeCount: 14,
      likedUserIds: ['user_002', 'user_005'],
    ),

    // 问题5的回答
    AnswerEntity(
      answerId: 'a005_1',
      questionId: 'q005',
      authorId: 'user_003',
      content:
          'Start with a pair of needle-nose pliers! They let you grip small support bits without squeezing the model. I gently twist the supports instead of pulling them straight—this breaks them off at the base without leaving scratches. For PLA, supports usually pop off easily if you print them with a 0.2mm gap from the model.',
      answerTime: DateTime(2024, 1, 11, 21, 15),
      likeCount: 25,
      likedUserIds: ['user_001', 'user_002', 'user_003'],
    ),
    AnswerEntity(
      answerId: 'a005_2',
      questionId: 'q005',
      authorId: 'user_004',
      content:
          'For ABS or PETG supports (which are stiffer), use a hair dryer on low heat! Warm the support for 10-15 seconds—this softens the plastic, making it easier to pull off. Just don’t hold the dryer too close to the model; you don’t want to warp it.',
      answerTime: DateTime(2024, 1, 11, 22, 30),
      likeCount: 28,
      likedUserIds: ['user_004', 'user_005', 'user_006'],
    ),
    AnswerEntity(
      answerId: 'a005_3',
      questionId: 'q005',
      authorId: 'user_005',
      content:
          'Adjust your slicer’s support settings to make removal easier! In Cura, I set the "support interface density" to 10% (lower than the default 20%)—this makes the layer between the support and model weaker. I also use "tree supports" instead of grid supports; they have fewer contact points with the model.',
      answerTime: DateTime(2024, 1, 11, 23, 45),
      likeCount: 22,
      likedUserIds: ['user_001', 'user_003', 'user_005'],
    ),
    AnswerEntity(
      answerId: 'a005_4',
      questionId: 'q005',
      authorId: 'user_006',
      content:
          'For resin supports, use a small amount of IPA on a cotton swab! Dab the support’s base—this softens the resin, so you can twist it off with tweezers. I also use a resin support remover tool (it looks like a tiny chisel) for tough spots, but be gentle to avoid chipping the model.',
      answerTime: DateTime(2024, 1, 12, 8, 20),
      likeCount: 30,
      likedUserIds: ['user_002', 'user_004', 'user_006'],
    ),
    AnswerEntity(
      answerId: 'a005_5',
      questionId: 'q005',
      authorId: 'user_007',
      content:
          'After removing supports, use sandpaper (400-800 grit) to smooth leftover marks! I start with 400 grit to sand down rough spots, then switch to 800 grit for a smooth finish. For PLA, you can also use a heat gun on low to melt tiny blemishes—just move it quickly to avoid warping.',
      answerTime: DateTime(2024, 1, 12, 9, 10),
      likeCount: 26,
      likedUserIds: ['user_001', 'user_003', 'user_004'],
    ),

    // 问题6的回答
    AnswerEntity(
      answerId: 'a006_1',
      questionId: 'q006',
      authorId: 'user_008',
      content:
          'The clicking is probably the extruder skipping! Check if your filament spool is tangled—if it’s stuck, the extruder can’t pull filament, so it clicks. I added a spool holder that keeps the filament feeding smoothly, and the noise stopped. Also, make sure the filament isn’t too tight on the spool.',
      answerTime: DateTime(2024, 1, 10, 12, 30),
      likeCount: 24,
      likedUserIds: ['user_001', 'user_002', 'user_003'],
    ),
    AnswerEntity(
      answerId: 'a006_2',
      questionId: 'q006',
      authorId: 'user_001',
      content:
          'The extruder’s tension spring might be too loose or too tight! If it’s too loose, the extruder can’t grip the filament (causing clicks); if it’s too tight, it crushes the filament. I adjusted my Prusa Mini’s extruder tension by turning the screw until the filament was held firmly but not crushed—no more clicking.',
      answerTime: DateTime(2024, 1, 10, 13, 45),
      likeCount: 21,
      likedUserIds: ['user_004', 'user_005', 'user_006'],
    ),
    AnswerEntity(
      answerId: 'a006_3',
      questionId: 'q006',
      authorId: 'user_002',
      content:
          'A clogged nozzle can cause clicking too! When the extruder tries to push filament through a blocked nozzle, it skips and clicks. I cleared my nozzle by heating it to 200°C, then pushing filament through manually with a cleaning rod. You can also use a cold pull (heating the nozzle, then pulling filament out quickly) to remove clogs.',
      answerTime: DateTime(2024, 1, 10, 14, 20),
      likeCount: 27,
      likedUserIds: ['user_001', 'user_002', 'user_004'],
    ),
    AnswerEntity(
      answerId: 'a006_4',
      questionId: 'q006',
      authorId: 'user_003',
      content:
          ' If your filament has inconsistent diameter, the extruder can’t feed it evenly—causing clicks. I measured my PLA filament with calipers, and some sections were 1.78mm instead of the standard 1.75mm. Switching to a high-quality filament with consistent diameter fixed the issue.',
      answerTime: DateTime(2024, 1, 10, 15, 15),
      likeCount: 23,
      likedUserIds: ['user_003', 'user_005'],
    ),
    AnswerEntity(
      answerId: 'a006_5',
      questionId: 'q006',
      authorId: 'user_004',
      content:
          'The X/Y/Z motors might need lubrication! I noticed clicking coming from my X-axis motor—after applying a drop of 3-in-1 oil to the motor’s bearings, the noise went away. Just don’t use too much oil; a tiny amount is enough. Check your printer’s manual to see which motors need lubrication.',
      answerTime: DateTime(2024, 1, 10, 16, 30),
      likeCount: 25,
      likedUserIds: ['user_002', 'user_004', 'user_006'],
    ),
  ];
}
